﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Doc.SDK.Core.Model
{
    /// <summary>
    /// 获取 Access Token
    /// </summary>
    public class QQDocTokenReq
    {
        public string access_token { get; set; }
        public string token_type { get; set; }
        public int expires_in { get; set; }
        public string refresh_token { get; set; }
        public string user_id { get; set; }
        public string scope { get; set; }
    }

    public class QQDocHeaders
    {
       
        /// <summary>
        /// 访问令牌，用于标识用户和接口鉴权
        /// </summary>
        public string AccessToken { get; set; }
        /// <summary>
        /// 应用ID，用于标识应用和接口鉴权
        /// </summary>
        public string ClientId { get; set; }
        /// <summary>
        /// 开放平台用户ID，用于标识用户和接口鉴权
        /// </summary>
        public string OpenId { get; set; }

        public QQDocHeaders()
        {

        }
        public QQDocHeaders(string accesstoken,string clientId,string openId)
        {
            AccessToken = accesstoken;
            ClientId= clientId;
            OpenId = openId;
        }
    }
    /// <summary>
    /// 基本类型
    /// </summary>
    public class QQDocRequest<T> where T:class
    {
        public int ret { get; set; }
        public string msg { get; set; }
        public T data { get; set; }
    }
    /// <summary>
    /// 获取用户信息
    /// </summary>
    public class UserinfoReq
    {
        public string openID { get; set; }
        public string nick { get; set; }
        public string avatar { get; set; }
        /// <summary>
        /// 用户授权方式。wx:微信qq:QQ
        /// </summary>
        public string source { get; set; }
    }
    /// <summary>
    /// 文件信息
    /// </summary>
    public class Reqfileinfo
    {
        /// <summary>
        /// 文档唯一标识，详见文档ID
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 文档标题
        /// </summary>
        public string title { get; set; }

        /// <summary>
        /// 文件类型
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 文档链接
        /// </summary>
        public string url { get; set; }

        /// <summary>
        /// 文档状态，normal：状态正常、trash：在回收站
        /// </summary>
        public string status { get; set; }

        /// <summary>
        /// 是否是文件创建者
        /// </summary>
        public bool isCreator { get; set; }

        /// <summary>
        /// 文档创建时间
        /// </summary>
        public int createTime { get; set; }
        /// <summary>
        /// 文档创建者昵称
        /// </summary>
        public string creatorName { get; set; }

        /// <summary>
        /// 是否是文件拥有者
        /// </summary>
        public bool isOwner { get; set; }

        /// <summary>
        /// 文档所有者昵称
        /// </summary>
        public string ownerName { get; set; }

        /// <summary>
        /// 文档最后修改时间
        /// </summary>
        public int lastModifyTime { get; set; }
        /// <summary>
        /// 文档最后修改者名字
        /// </summary>
        public string lastModifyName { get; set; }

        /// <summary>
        /// RelativeFile的array，存储相关联的文档信息
        //只有类型为form或者sheet的文档可能返回
        /// </summary>
        public object relativeFiles { get; set; }

        /// <summary>
        /// 收集表发布状态
        ///unpublished：尚未发布
        ///collecting：正在收集
        ///closed：结束收集
        ///只有form类型会返回
        /// </summary>
        public string formCollectingStatus { get; set; }

        /// <summary>
        /// 收集表发布结束时间戳，单位为秒
        ///publishEndTime为0：发布收集且不停止收集（默认）
        ///publishEndTime小于当前时间：暂停收集
        ///publishEndTime大于当前时间：发布收集并设定收集结束时间
        ///只有form类型且为文档拥有者会返回
        /// </summary>
        public int formCollectingEndTime { get; set; }
    }

    /// <summary>
    /// 返回文件夹ID
    /// </summary>
    public class ReqFoldersInfo
    {
        public string ID { get; set; }
    }
}
